Optimal. Leaf size=24 \[ -\frac {a \coth (c+d x)}{d}+\frac {b \tanh (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3744, 14}
\begin {gather*} \frac {b \tanh (c+d x)}{d}-\frac {a \coth (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 3744
Rubi steps
\begin {align*} \int \text {csch}^2(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx &=\frac {\text {Subst}\left (\int \frac {a+b x^2}{x^2} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (b+\frac {a}{x^2}\right ) \, dx,x,\tanh (c+d x)\right )}{d}\\ &=-\frac {a \coth (c+d x)}{d}+\frac {b \tanh (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 24, normalized size = 1.00 \begin {gather*} -\frac {a \coth (c+d x)}{d}+\frac {b \tanh (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(58\) vs.
\(2(24)=48\).
time = 1.95, size = 59, normalized size = 2.46
method | result | size |
risch | \(-\frac {2 \left (a \,{\mathrm e}^{2 d x +2 c}+b \,{\mathrm e}^{2 d x +2 c}+a -b \right )}{d \left (1+{\mathrm e}^{2 d x +2 c}\right ) \left ({\mathrm e}^{2 d x +2 c}-1\right )}\) | \(59\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 39, normalized size = 1.62 \begin {gather*} \frac {2 \, b}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}} + \frac {2 \, a}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 88 vs.
\(2 (24) = 48\).
time = 0.37, size = 88, normalized size = 3.67 \begin {gather*} -\frac {4 \, {\left (a \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )}}{d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + d \sinh \left (d x + c\right )^{3} - d \cosh \left (d x + c\right ) + {\left (3 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right ) \operatorname {csch}^{2}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 45, normalized size = 1.88 \begin {gather*} -\frac {2 \, {\left (a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} + a - b\right )}}{d {\left (e^{\left (4 \, d x + 4 \, c\right )} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.05, size = 43, normalized size = 1.79 \begin {gather*} -\frac {\frac {2\,\left (a-b\right )}{d}+\frac {2\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a+b\right )}{d}}{{\mathrm {e}}^{4\,c+4\,d\,x}-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________